package com.cimp.domain.common;

/**
 * [简要描述]: 通用处理结果
 * [详细描述]:
 *
 * @author huojinhao
 * @date 2018/10/8
 */
public class Result {
    private int resultCode;
    private String resultMsg;

    public Result() {
    }

    public Result(int resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    public static Result success(){
        return new Result();
    }

    public static Result error(String msg){
        return new Result(-1,msg);
    }

    public int getResultCode() {
        return resultCode;
    }

    public void setResultCode(int resultCode) {
        this.resultCode = resultCode;
    }

    public String getResultMsg() {
        return resultMsg;
    }

    public void setResultMsg(String resultMsg) {
        this.resultMsg = resultMsg;
    }
}
